package com.ruoyi.web.controller.vantController.teamController;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.service.construction.ConstructionInfoService;
import com.ruoyi.system.service.construction.ConstructionLabelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/conlabel")
@CrossOrigin
public class ApiLabelController extends BaseController {

    @Autowired
    private ConstructionLabelService constructionLabelService;

    @Autowired
    private ConstructionInfoService constructionInfoService;

    @GetMapping("/findAllList/{constructionId}")
    public AjaxResult findAllList(@PathVariable(value = "constructionId", required = false) Long constructionId){
        return AjaxResult.success(constructionLabelService.findAllList(constructionId));
    }

    @GetMapping("/findAllByIdCon/{constructionId}")
    public AjaxResult findAllByIdCon(@PathVariable(value = "constructionId", required = false) Long constructionId){
        return AjaxResult.success(constructionInfoService.xiaoshoushuliang(constructionId));
    }



}
